﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EfDomain.Entities
{
    /*一对一映射*/

    // Principal (parent)
    public class Blog:BaseEntity
    {
        public BlogHeader? Header { get; set; } // Reference navigation to dependent
    }

    // Dependent (child)
    public class BlogHeader:BaseEntity
    {
        public int BlogId { get; set; } // Required foreign key property
        public Blog Blog { get; set; } = null!; // Required reference navigation to principal
    }

}
